package com.acme.task5;

public class TextModifier {
	public static void main(String[] args) {

		// check number of arguments:
		if (args.length != 1) {
			System.out.println("Invalid number of arguments:");
			for (String s : args) {
				System.out.println("argument: "+ s);
			}
			System.exit(0);
		}
		
		String str = args[0];
		for (int i = 0; i < str.length(); i++) {
			char charAtIndex = str.charAt(i);
			// do the task at labguide. Note that String is not a simple char array, but an object
			if (Character.isDigit(charAtIndex)) {
				continue;
			}
			if ((charAtIndex=='-')||(charAtIndex=='+')) {
				System.out.print(""+charAtIndex+charAtIndex);
				continue;
			}
			System.out.print(charAtIndex);
		}
	}
}
